public class Car {
    private double speed;
    private String model;
    //空构造函数
    public Car(){};

    public Car(double speed, String model)
    {
        this.model = model;
        this.speed = speed;
    }
    public String getModel()
    {
        return this.model;
    }
    public void setModel(String model)
    {
        this.model = model;
    }
    public double getSpeed()
    {
        return this.speed;
    }
    public void setSpeed(double speed)
    {
        this.speed = speed;
    }

    @Override
    public String toString()
    {
        return "Car{" +
                "model='" + model + '\'' +
                ", speed=" + speed + "km/h" +
                '}';
    }

}
